<template>
    <div>
        <h1>用户登录列表页面</h1>
        <table class="table table-bordered" border="1">
            <thead>
                <tr>
                    <th>账号ID</th>
                    <th>账号</th>
                    <th>密码</th>
                    <th>注册时间</th>
                </tr>
            </thead>
            <tbody>
                <tr v-for="item in info" :key="item.U_Lid">
                    <th>{{item.U_Lid}}</th>
                    <th>{{item.U_Lname}}</th>
                    <th>{{item.U_Lpass.substring(0,4)+'***'}}</th>
                    <th>{{item.U_Ldate.substring(0,10)}}</th>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">

import { onMounted, ref} from 'vue';
import axiox from 'axios';
onMounted(() => {
    LoginShow()
})

const info :any= ref([])

const LoginShow = () => {
    axiox({
        method:'get',
        url:'http://localhost:51873/api/User/LoginShow'
    })
    .then(res => {
        info.value = res.data
    })
    .catch(err => {
        console.log(err);
    })
}
</script>